/*
  BOOL WINAPI DeviceIoControl(
  __in         HANDLE hDevice,
  __in         DWORD dwIoControlCode,
  __in_opt     LPVOID lpInBuffer,
  __in         DWORD nInBufferSize,
  __out_opt    LPVOID lpOutBuffer,
  __in         DWORD nOutBufferSize,
  __out_opt    LPDWORD lpBytesReturned,
  __inout_opt  LPOVERLAPPED lpOverlapped
);
 */
HANDLE hDevice;
char OutputBuffer[100];
char InputBuffer[100];
ULONG bytesReturned;

bRc = DeviceIoControl ( hDevice,
                        (DWORD) IOCTL_SIOCTL_METHOD_BUFFERED,
                        &InputBuffer,
                        (DWORD) strlen ( InputBuffer )+1,
                        &OutputBuffer,
                        sizeof( OutputBuffer),
                        &bytesReturned,
                        NULL
                        );

if ( !bRc )
  {
    printf ( "Error in DeviceIoControl : %d", GetLastError());
    return;

  }
printf("    OutBuffer (%d): %s\n", bytesReturned, OutputBuffer);
